unit uTypes;

interface

uses CommonTypes, Classes, cxGridDBBandedTableView;

type

  TSearchThreadStatus = record
    TotalPages : Integer;
    LoadedPages : Integer;
    TotalItems : Integer;
    LoadedItems : Integer;
    SavedItems : Integer;
    CurrentCategory : Integer;
    TotalCategories : Integer;
    ThreadID : Integer;
    Operation : string;
  end;

  TSearchProperties = record
    rGlobalID : string;
    rCategoryID : string;
    rBuyerPostalCode : string;
    rKeyWords : string;
    rDescriptionSearch : Boolean;
    rCondition : string;
    rSearchID : Integer;
    rLocatedIn : string;
    rAvailableto : string;
    rSeller : string;
    rExcludeSeller : string;
    rListingType : string;
    rPriceFrom : Real;
    rPriceTo : Real;
    rPriceCurrency : string;
    rFeedbackScoreMax : Integer;
    rFeedbackScoreMin : Integer;
    rBidsMax : Integer;
    rBidsMin : Integer;
    rQuantityMax : Integer;
    rQuantityMin : Integer;
    rEndTimeFrom : TDateTime;
    rEndTimeTo : TDateTime;
    rMaxDistance : Integer;
    rLocalSearchOnly : Boolean;
    rPaymentMethod : string;
    rSellerBusinessType : string;
    rCurrency : string;
    rHideDuplicates : Boolean;
    rSortOrder : string;
  end;

  TDownloadImageThreadStatus = record
    TotalItems : Integer;
    SavedPhotos : Integer
  end;

  TItemDetails = record
    ItemID : string;
    ItemTitle : string;
    URL : string;
    Price : Real;
    PriceCurrency : string;
    BuyItNowPrice : Real;
    BuyItNowCurrency : string;
    SellerID : string;
    ItemLocation : string;
    country : string;
    ShippingCost : Real;
    ShippingCostCurrency : string;
    GalleryURL : string;
    PictureURL : string;
    StartTime : TDateTime;
    EndTime : TDateTime;
    ListingType : string;
    SearchID : Integer;
    Updated : TDateTime;
    CategoryID : string;
    categoryName : string;
    Description : string;
    globalId : string;
    PaymentMethods : string;
    BidCount : Integer;
    ListingStatus : string;
    QuantitySold : Integer;
    ReserveMet : Boolean;
    ShipToLocations : string;
  end;

  TAspect = record
    AspectValName : string;
    Aspectcnt : Integer;
  end;

  TCategoryHistogram = record
    CategoryName : string;
    CategoryID : Integer;
    Count : Integer;
  end;

  TCategoryHistogramArray = array of TCategoryHistogram;

  TAspectArray = array of TAspect;

  ListingTypes =(AdFormat, Auction, AuctionWithBIN, Classified, FixedPrice, StoreInventory, All);

  Tinisettings = record
    // database
    DataPath : string;
    // sheduling
    autorun : Boolean;
    checkregular : Boolean;
    Checkperiod : Integer;
    //autorunsearch : Boolean;
    runminimized : Boolean;
    // ebay
    AppID : string;
    DevID : string;
    CertID : string;
    Token : string;
    timeshiftebay : TDateTime;
    DecimalSeparator : Char;
    CSVSeparator : Char;
    ShowLatsResults : Integer;
    NotOlder : Integer;
    ClearData : Boolean;
    xmloutput : Boolean;
    logfolder : string;
    dblogfilename : string;
  end;

  TCatRec = record
    CategoryID : Integer;
    CategoryLevel : Integer;
    CategoryName: string;
    CategoryParentID : Integer;
    LeafCategory : Boolean;
    SavedCategoriesCnt : Integer;
    CatCount : Integer;
    FGlobalSiteID : Global_ID;
  end;

  MFOperations = (opIdle,opCheckCategories,opIdleCat,opSearching,opDowloadImages,opDownloadItemsDetails,opDownloadCategories,opSaveCategories,opLoadAspects);

implementation

end.
